package test_2_27;
interface areas
{
    public void area();
}
class yuan implements areas
{
    int x;
    int y;
    int r;

    public yuan(int x, int y, int r) {
        this.x = x;
        this.y = y;
        this.r = r;
    }

    public int getX() {
        return x;
    }

    public void setX(int x) {
        this.x = x;
    }

    public int getY() {
        return y;
    }

    public void setY(int y) {
        this.y = y;
    }

    public int getR() {
        return r;
    }

    public void setR(int r) {
        this.r = r;
    }

    @Override
    public void area() {
        double a=3.14*r*r;
        System.out.println(a);
    }
}
class fang implements areas
{
    int chang;
    int kuan;

    public fang(int chang, int kuan) {
        this.chang = chang;
        this.kuan = kuan;
    }

    public int getChang() {
        return chang;
    }

    public void setChang(int chang) {
        this.chang = chang;
    }

    public int getKuan() {
        return kuan;
    }

    public void setKuan(int kuan) {
        this.kuan = kuan;
    }
    public void area() {
        double a=chang*kuan;
        System.out.println(a);
    }
}

public class three {
    public static void main(String[] args) {
        yuan y=new yuan(1,2,3);
        fang f=new fang(3,4);
        y.area();
        f.area();
    }
}
